package com.icart.entities;

import javax.persistence.*;
import java.math.BigDecimal;

@Entity
@Table(name = "cu_custtcdiscfee", schema = "amp", catalog = "")
@IdClass(CuCusttcdiscfeeEntityPK.class)
public class CuCusttcdiscfeeEntity {
    private long tcoid;
    private long custid;
    private long feeid;
    private long tcid;
    private String feeobj;
    private Long feeobjid;
    private long treeid;
    private String feecaltype;
    private BigDecimal feeval;
    private String remark;

    @Id
    @Column(name = "tcoid")
    public long getTcoid() {
        return tcoid;
    }

    public void setTcoid(long tcoid) {
        this.tcoid = tcoid;
    }

    @Basic
    @Column(name = "custid")
    public long getCustid() {
        return custid;
    }

    public void setCustid(long custid) {
        this.custid = custid;
    }

    @Id
    @Column(name = "feeid")
    public long getFeeid() {
        return feeid;
    }

    public void setFeeid(long feeid) {
        this.feeid = feeid;
    }

    @Basic
    @Column(name = "tcid")
    public long getTcid() {
        return tcid;
    }

    public void setTcid(long tcid) {
        this.tcid = tcid;
    }

    @Basic
    @Column(name = "feeobj")
    public String getFeeobj() {
        return feeobj;
    }

    public void setFeeobj(String feeobj) {
        this.feeobj = feeobj;
    }

    @Basic
    @Column(name = "feeobjid")
    public Long getFeeobjid() {
        return feeobjid;
    }

    public void setFeeobjid(Long feeobjid) {
        this.feeobjid = feeobjid;
    }

    @Basic
    @Column(name = "treeid")
    public long getTreeid() {
        return treeid;
    }

    public void setTreeid(long treeid) {
        this.treeid = treeid;
    }

    @Basic
    @Column(name = "feecaltype")
    public String getFeecaltype() {
        return feecaltype;
    }

    public void setFeecaltype(String feecaltype) {
        this.feecaltype = feecaltype;
    }

    @Basic
    @Column(name = "feeval")
    public BigDecimal getFeeval() {
        return feeval;
    }

    public void setFeeval(BigDecimal feeval) {
        this.feeval = feeval;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CuCusttcdiscfeeEntity that = (CuCusttcdiscfeeEntity) o;

        if (tcoid != that.tcoid) return false;
        if (custid != that.custid) return false;
        if (feeid != that.feeid) return false;
        if (tcid != that.tcid) return false;
        if (treeid != that.treeid) return false;
        if (feeobj != null ? !feeobj.equals(that.feeobj) : that.feeobj != null) return false;
        if (feeobjid != null ? !feeobjid.equals(that.feeobjid) : that.feeobjid != null) return false;
        if (feecaltype != null ? !feecaltype.equals(that.feecaltype) : that.feecaltype != null) return false;
        if (feeval != null ? !feeval.equals(that.feeval) : that.feeval != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (tcoid ^ (tcoid >>> 32));
        result = 31 * result + (int) (custid ^ (custid >>> 32));
        result = 31 * result + (int) (feeid ^ (feeid >>> 32));
        result = 31 * result + (int) (tcid ^ (tcid >>> 32));
        result = 31 * result + (feeobj != null ? feeobj.hashCode() : 0);
        result = 31 * result + (feeobjid != null ? feeobjid.hashCode() : 0);
        result = 31 * result + (int) (treeid ^ (treeid >>> 32));
        result = 31 * result + (feecaltype != null ? feecaltype.hashCode() : 0);
        result = 31 * result + (feeval != null ? feeval.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        return result;
    }
}
